﻿<UserControl x:Class="SoftSource.Timecard.Views.ReportListView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:dataFormToolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data.DataForm.Toolkit"
             xmlns:controlsToolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Toolkit"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             mc:Ignorable="d"
             d:DesignWidth="559"
             d:DesignHeight="404">

    <controlsToolkit:BusyIndicator x:Name="Busy"
                                   HorizontalContentAlignment="Stretch"
                                   VerticalContentAlignment="Stretch">
        <Grid x:Name="LayoutRoot"
              Background="White">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="15" />
                <RowDefinition />
            </Grid.RowDefinitions>
            <Grid HorizontalAlignment="Left"
                  Margin="6,6,0,6">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="Auto" />
                </Grid.ColumnDefinitions>
                <TextBlock HorizontalAlignment="Left"
                           VerticalAlignment="Top"
                           Text="{Binding SelectedItem.Description, ElementName=listBox, Mode=OneWay}"
                           TextWrapping="Wrap"
                           Grid.Column="1"
                           FontSize="16"
                           Margin="10,0,0,0" />
                <Button Content="View Report"
                        d:LayoutOverrides="Height"
                        Click="ViewReport_Click"
                        VerticalAlignment="Bottom" />
            </Grid>
            <Border x:Name="ReportParameterDataFormBorder"
                    HorizontalAlignment="Left"
                    Margin="4"
                    Grid.Row="1" />
            <Path Fill="White"
                  Stretch="Fill"
                  Stroke="Black"
                  Height="1"
                  UseLayoutRounding="False"
                  Data="M0,64 L500,64"
                  VerticalAlignment="Center"
                  Grid.Row="2" />
            <ListBox x:Name="listBox"
                     Grid.Row="3"
                     DisplayMemberPath="Description"
                     ItemsSource="{Binding Reports, Mode=OneWay}"
                     SelectionChanged="ReportListBox_SelectionChanged" />
        </Grid>
    </controlsToolkit:BusyIndicator>
</UserControl>